package com.cat.controller;

import com.cat.service.CityService;
import com.cat.util.LayUI;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class CityController {
    @Resource
    private CityService cityService;
    @GetMapping("/admin/getCitys")
    @ResponseBody
    public LayUI getAllCity(){
        LayUI lu=new LayUI();
        lu.setCode(0);
        lu.setMsg("");
        lu.setData(cityService.getAllCity());
        return lu;

    }
}
